﻿namespace TestTool.HttpTransport.MessageEncoding
{
    using System;
    using System.ServiceModel.Channels;

    internal class ControlledTextMessageEncoderFactory : MessageEncoderFactory
    {
        private string _charSet;
        private MessageEncoder _encoder;
        private string _mediaType;
        private System.ServiceModel.Channels.MessageVersion _version;

        internal ControlledTextMessageEncoderFactory(string mediaType, string charSet, System.ServiceModel.Channels.MessageVersion version)
        {
            this._version = version;
            this._mediaType = mediaType;
            this._charSet = charSet;
            this._encoder = new ControlledTextMessageEncoder(this);
        }

        internal string CharSet
        {
            get
            {
                return this._charSet;
            }
        }

        public override MessageEncoder Encoder
        {
            get
            {
                return this._encoder;
            }
        }

        internal string MediaType
        {
            get
            {
                return this._mediaType;
            }
        }

        public override System.ServiceModel.Channels.MessageVersion MessageVersion
        {
            get
            {
                return this._version;
            }
        }
    }
}

